#pragma once
#include <atomic>
#include <string>
#include <thread>
#include <iostream>
#include <vector>
#include <mutex>
#include <queue>
#include <opencv2/opencv.hpp>
#include <opencv2/freetype.hpp>
#include "stream/base_osd.h"

namespace stream {

struct CVStreamOsdInfo: public StreamOsdBaseInfo
{
  cv::Scalar boxColorOK;          // 正确框的颜色
  cv::Scalar boxColorNG;          // 错误信息框的颜色
  int fontHeight; 
};

class CVOsdText: public BaseOsd
{
public:
  CVOsdText(CVStreamOsdInfo* osd_ifo, LogInfo* log_info);
  ~CVOsdText();

public:
  int init_params();
  int draw_osd(stream::ImageBlob& buffer, std::vector<OSDDrawInfo>& osdd_ifos);

private:
  cv::Ptr<cv::freetype::FreeType2> ft2;


};

}